package com.offcn.service.impl;

import com.offcn.entity.News;
import com.offcn.mapper.NewsMapper;
import com.offcn.service.NewsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service("newsService")
public class NewsServiceImpl implements NewsService {
    @Resource
    private NewsMapper newsMapper;
    @Override
    public List<News> selectByAll() {
        return newsMapper.selectByAll();
    }

    @Override
    public News selectById(int id) {
        return newsMapper.selectById(id);
    }
}
